/*
 * Hibiscus is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published
 * by the Free Software Foundation; either version 3 of the License,
 * or (at your option) any later version.
 *
 * Hibiscus is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Hibiscus; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 * USA
 *
 * Copyright (C) 2011 Tetete - http://tetete.hu.
 */
package hu.tetete.hibiscus.model;

import java.io.Serializable;

/**
 * TODO javadoc.
 */
public class Taxon implements Serializable {

    /** @see Serializable */
    private static final long serialVersionUID = 1L;
    
    private final Long       id;
    private final String     name;
    private final String     scienceName;
    private final TaxonLevel taxonLevel;
    private final String     photo;
    private final Long       parentId;

    /**
     * @param id the id.
     * @param name the name of the taxon.
     * @param scienceName the science name of the taxon.
     * @param taxonLevel the {@link TaxonLevel}.
     * @param photo The file name of the main photo.
     * @param parentId the id of the parent taxon.
     */
    public Taxon(final Long id,
            final String name,
            final String scienceName,
            final TaxonLevel taxonLevel,
            final String photo,
            final Long parentId) {
        this.id          = id;
        this.name        = name;
        this.scienceName = scienceName;
        this.taxonLevel  = taxonLevel;
        this.photo       = photo;
        this.parentId    = parentId;
    }

    /**
     * @return the id
     */
    public Long getId() {
        return this.id;
    }

    /**
     * @return the name
     */
    public String getName() {
        return this.name;
    }

    /**
     * @return the science name of the taxon
     */
    public String getScienceName() {
        return this.scienceName;
    }

    /**
     * @return the taxonLevel
     */
    public TaxonLevel getTaxonLevel() {
        return this.taxonLevel;
    }

    /**
     * @return the parentId
     */
    public Long getParentId() {
        return this.parentId;
    }

    /**
     * @return the photo
     */
    public String getPhoto() {
        return photo;
    }

    /**
     * @see Object#toString()
     */
    @Override
    public String toString() {
        return this.name;
    }

}
